package entity;

import java.io.Serializable;
import java.util.List;

import javax.inject.Named;
import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

/**
 * Entity implementation class for Entity: Union
 *
 */
@Named(value="union")
@Entity
@DiscriminatorValue("Y")
public class Union extends Association implements Serializable {

	
	private static final long serialVersionUID = 1L;
	private float union_tax;
	
	@OneToMany(mappedBy="union",cascade=CascadeType.REMOVE)
	private List<UnionDue> unionDues;
	
	public Union(){
		super();
	}
	public Union(float union_tax) {
		super();
		this.union_tax=union_tax;
	}
	public Union(float union_tax,Employee employee) {
		super();
		this.union_tax=union_tax;
		this.setEmployee(employee);
	}

	public float getUnion_tax() {
		return union_tax;
	}

	public void setUnion_tax(float union_tax) {
		this.union_tax = union_tax;
	}
	public List<UnionDue> getUnionDues() {
		return unionDues;
	}
	public void setUnionDues(List<UnionDue> unionDues) {
		this.unionDues = unionDues;
	}
   
}
